package com.fading.mall.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fading.common.validator.group.UpdateGroup;
import com.fading.mall.product.exception.groups.SaveGroup;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.*;

/**
 * 品牌
 * 
 * @author fadingYY
 * @email 2714592747@qq.com
 * @date 2021-08-11 16:21:42
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 品牌id
	 */
	@TableId
	@NotNull(message = "修改必须指定id" , groups = {UpdateGroup.class})
	@Null(message = "添加不能指定id" ,groups = {SaveGroup.class})
	private Long brandId;
	/**
	 * 品牌名
	 */
	@NotBlank(message = "品牌名必须填写" ,groups = {UpdateGroup.class,SaveGroup.class})
	private String name;
	/**
	 * 品牌logo地址
	 */
	@NotEmpty(message = "logo不能为空",groups = {UpdateGroup.class})
	@URL(message = "url不符合规范", groups = {UpdateGroup.class,SaveGroup.class})
	private String logo;
	/**
	 * 介绍
	 */

	private String descript;
	/**
	 * 显示状态[0-不显示；1-显示]
	 */
	private Integer showStatus;
	/**
	 * 检索首字母
	 */
	private String firstLetter;
	/**
	 * 排序
	 */
	@Min(value = 0 , message = "排序必须大于0" ,groups = {UpdateGroup.class,SaveGroup.class})
	private Integer sort;

}
